# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=perl-libwww
pkgver=6.26
pkgrel=3
pkgdesc="The World-Wide Web library for Perl"
arch=('any')
url="https://metacpan.org/release/libwww-perl"
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-encode-locale' 'perl-file-listing'
         'perl-html-parser' 'perl-http-cookies' 'perl-http-daemon'
         'perl-http-date' 'perl-http-negotiate' 'perl-lwp-mediatypes'
         'perl-net-http' 'perl-uri' 'perl-www-robotrules'
         'perl-http-message' 'perl-try-tiny')
optdepends=('perl-lwp-protocol-https: for https:// url schemes')
checkdepends=('perl-test-fatal' 'perl-test-requiresinternet')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/O/OA/OALDERS/libwww-perl-${pkgver}.tar.gz)
sha1sums=('b8cc8fd418990966fd46975ad73a8d4aa2e5e65c')

build() {
  cd libwww-perl-${pkgver}
  perl Makefile.PL --aliases INSTALLDIRS=vendor
  make
}

check()  {
  cd libwww-perl-${pkgver}
  make test
}

package() {
  cd libwww-perl-${pkgver}
  make DESTDIR="$pkgdir" install
}
